/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.admanager.scamapping.plugin.scamapping.impl;

import org.admanager.scamapping.plugin.scamapping.*;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.impl.EFactoryImpl;

import org.eclipse.emf.ecore.plugin.EcorePlugin;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class scamappingFactoryImpl extends EFactoryImpl implements scamappingFactory {
	/**
	 * Creates the default factory implementation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static scamappingFactory init() {
		try {
			scamappingFactory thescamappingFactory = (scamappingFactory)EPackage.Registry.INSTANCE.getEFactory("http://scamapping/1.0"); 
			if (thescamappingFactory != null) {
				return thescamappingFactory;
			}
		}
		catch (Exception exception) {
			EcorePlugin.INSTANCE.log(exception);
		}
		return new scamappingFactoryImpl();
	}

	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public scamappingFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case scamappingPackage.ROOT_MAPPING: return createRootMapping();
			case scamappingPackage.COMPOSITE_MAPPING: return createCompositeMapping();
			case scamappingPackage.COMPONENT_MAPPING: return createComponentMapping();
			case scamappingPackage.REFERENCE_MAPPING: return createReferenceMapping();
			case scamappingPackage.SERVICE_MAPPING: return createServiceMapping();
			case scamappingPackage.COMPONENT_REFERENCE_MAPPING: return createComponentReferenceMapping();
			case scamappingPackage.COMPONENT_SERVICE_MAPPING: return createComponentServiceMapping();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public RootMapping createRootMapping() {
		RootMappingImpl rootMapping = new RootMappingImpl();
		return rootMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public CompositeMapping createCompositeMapping() {
		CompositeMappingImpl compositeMapping = new CompositeMappingImpl();
		return compositeMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ComponentMapping createComponentMapping() {
		ComponentMappingImpl componentMapping = new ComponentMappingImpl();
		return componentMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ReferenceMapping createReferenceMapping() {
		ReferenceMappingImpl referenceMapping = new ReferenceMappingImpl();
		return referenceMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ServiceMapping createServiceMapping() {
		ServiceMappingImpl serviceMapping = new ServiceMappingImpl();
		return serviceMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ComponentReferenceMapping createComponentReferenceMapping() {
		ComponentReferenceMappingImpl componentReferenceMapping = new ComponentReferenceMappingImpl();
		return componentReferenceMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ComponentServiceMapping createComponentServiceMapping() {
		ComponentServiceMappingImpl componentServiceMapping = new ComponentServiceMappingImpl();
		return componentServiceMapping;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public scamappingPackage getscamappingPackage() {
		return (scamappingPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static scamappingPackage getPackage() {
		return scamappingPackage.eINSTANCE;
	}

} //scamappingFactoryImpl
